package c.x.jy.dao.dao;

import c.x.jy.dao.dto.QuicktestEntityDto;
import c.x.jy.dao.dto.QuicktestypeEntityDto;
import c.x.jy.dao.entity.QuicktestEntity;
import c.x.jy.dao.entity.QuicktestypeEntity;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 闪测类型表
 * 
 * @author amwhyh
 * @email xxx@xx.com
 * @date 2021-05-25 11:29:53
 */
@Mapper
public interface QuicktestypeDao extends BaseMapper<QuicktestypeEntity> {
    @Select(" select * from t_quicktest_type where hot=1 limit 3 ")
    List<QuicktestypeEntity> hotlist();

    @Select("select q.*,u.username username from t_quicktest_type q LEFT JOIN sys_user u on u.user_id=q.create_id  ${ew.customSqlSegment}")
    IPage<QuicktestypeEntityDto> querypage(IPage<QuicktestypeEntity> page, @Param(Constants.WRAPPER) QueryWrapper<QuicktestypeEntity> query);
}

